package com.example.demo.jpasql;/*
 *@author wujinhui
 *@create ${date} ${time} 
 *@version 1.0.0
 *@blog
 */

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.List;

@Controller
public class TestSqlControler {
    @Autowired
    private UseRepository usep;
    @GetMapping("/hello")
    public String hello() throws Exception {
        List<User>u1=usep.findAllByAge(12);
         // System.out.println(userlist.get(0).getAge()+"------------------------------------------");
        System.out.println(u1.size()+"------------------------------------------");
        System.out.println(u1.get(0).getName()+"--------------------------------------------");
        return "index";
    }
}
